//
//  GlobalMethod+Device.h
//  MexicoLoan
//
//  Created by WXP on 2025/2/26.
//

#import "GlobalMethod.h"

NS_ASSUME_NONNULL_BEGIN

@interface GlobalMethod (Device)

#pragma mark - 获取 APP 版本号
+ (NSString *)getVersion;

#pragma mark - 获取 APP 构建版本号
+ (NSString *)getBundleVersion;

#pragma mark - 获取 APP 名字
+ (NSString *)getAppName;

#pragma mark - 获取包名
+ (NSString *)getBundleIdentifier;

#pragma mark - 获取iPhone型号名称
+ (NSString *)getDeviceModelName;

#pragma mark - 获取屏幕尺寸
+ (NSString *)getScreenDiagonalSize;

#pragma mark - 获取 ADID
+ (NSString *)getAdid;

#pragma mark - 获取 IDFA
+ (NSString *)getIDFA;
+ (NSString *)getAdvertisingIdentifier;

#pragma mark - 获取 deviceNo
+ (NSString *)getDeviceNo;

#pragma mark - 获取 globallyUniqueString
// 8-4-4-4-12-4-16
+ (NSString *)getGloballyUniqueString;

#pragma mark - 获取手机 内存大小
+ (NSString *)getDeviceTotalMemory;
+ (NSString *)getDeviceFreeMemory;
+ (NSString *)getDeviceActiveMemory;
+ (NSString *)getDeviceNotActiveMemory;


#pragma mark - 获取 userRandomKey
+ (NSString *)getUserRandomKey;

#pragma mark - 时间
// 设备最后一次启动时间
+ (NSInteger)getDeviceLastStartUpTime;

// 系统开机时间
+ (NSTimeInterval)getSystemStartUptime;


#pragma mark - 获取设备网络类型
+ (NSString *)getDeviceNetworkType;

#pragma mark - 运营商无线接入技术
+ (NSString *)currentRadioAccessTechnology;

#pragma mark - 获取 设备开机到现在的毫秒数
// 获取设备开机到现在的毫秒数 *1000 - (包含睡眠时间)
+ (uint64_t)getStartDeviceMillisecondsIncludingSleep;

// 获取设备开机到现在的毫秒数 *1000 - (不包含睡眠时间)
+ (uint64_t)getStartDeviceMillisecondsExcludingSleep;

#pragma mark - 判断 是否开启代理
+ (BOOL)isUsingProxy;

#pragma mark - 判断 是否使用vpn
+ (BOOL)isUsingVPN;

#pragma mark - 是否开启低电量模式
+ (BOOL)isLowPowerModeEnabled;

#pragma mark - 获取环境变量信息
+ (NSDictionary *)getEnvironmentVariables;

#pragma mark - 获取启动参数（调试和命令行）
+ (NSArray<NSString *> *)getLaunchArguments;

#pragma mark - 开关手电筒
+ (void)toggleFlashlight;

@end

NS_ASSUME_NONNULL_END
